package org.jeecg.modules.basic.demo.apartment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.basic.demo.apartment.entity.LwgyBaseApartment;

import java.util.List;
import java.util.Map;

/**
 * @Description: 学校公寓信息
 * @Author: jeecg-boot
 * @Date:   2020-12-28
 * @Version: V1.0
 */
public interface LwgyBaseApartmentMapper extends BaseMapper<LwgyBaseApartment> {

	/**
	 * 编辑节点状态
	 * @param id
	 * @param status
	 */
	void updateTreeNodeStatus(@Param("id") String id,@Param("status") String status);

	/**
	 * 修改床位价格
	 * @param id
	 * @param bedPrice
	 */
	void updatePrice(@Param("id") String id,@Param("bedPrice") String bedPrice);

	List<String> getChildIds(String id);

	String get_maxInnerCode(String pid);

	String get_parentInnerCode(String id);

	LwgyBaseApartment getLevel(String pid);

	void updateLevel(@Param("pid")String pid,@Param("level")String level);

	void insertList(List<LwgyBaseApartment> unit_list);

	void updateHasChild(LwgyBaseApartment hasChild);

    List<String> getRoomType(String id);

	@Select("SELECT id FROM lwgy_base_apartment WHERE pid = #{pid} ORDER BY inner_code ASC")
	List<String> getChildrenIdByPid(String pid);

	List<LwgyBaseApartment> getFjBaseInfo();

	List<Map<String,Object>> getEveryBuildPersonNumBer(@Param("workNo")String workNo);

	List<Map<String,Object>> getEveryBuildPersonNumBerS();


	List<LwgyBaseApartment>  selectListByPidAndWork(@Param("pid")String pid,@Param("workNo")String workNo,@Param("apartmentType")String apartmentType);

	List<Map<String,String>> getFjInfoById(String id);


	List<Map<String,String>>  getRoomInfo();
}
